#include <iostream>
#include <sstream>
#include <iomanip>
#include <string>

int main(int argc,char *argv[])
{
    unsigned int num[5] = {0x01,0x02,0x03,0x04,1122};

    std::ostringstream token;
    for(auto i:num) {
	std::cout << std::hex << std::setfill('0') << std::setw(4) << i << std::endl;
	token << std::hex << std::setfill('0') << std::setw(4) << i;
    }
    std::cout << token.str() << std::endl;

    std::string url = "http://10.107.14.90:8080/v1/api/back";
    auto hpos = url.find("://")+3;
    auto hend = url.find("/",hpos);
    auto host = url.substr(hpos,hend-hpos);
    std::cout << "Host:" << host << std::endl;

    return 0;
}
